package com.etc;

import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class LogDataBean {

    /**
     * events : 14733672361430connectByQRCode
     * header : {"cid_sn":"1501004207EE98AA","mobile_data_type":"","os_ver":"22","mac":"1c:77:f6:78:f5:75","resolution"
     * :"1080x1920","commit_time":"1502686418952","sdk_ver":"103","device_id_type":"mac","city":"江门市","device_model":
     * "HUAWEI VNS-AL00","android_id":"867830021735040","carrier":"中国xx","promotion_channel":"1","app_ver_name":"1.4",
     * "imei":"867830021735040","app_ver_code":"4010104","pid":"pid","net_type":"3","device_id":"m.1c:77:f6:78:f5:75",
     * app_device_id":"m.1c:77:f6:78:f5:75","release_channel":"1009","country":"CN","time_zone":"28800000","os_name":"an
     * droid","manufacture":"OPPO","commit_id":"fde7ee2e48494b24bf3599771d7c2a78","account":"none","app_token":"XIAONIU_
     * A","app_id":"com.appid.xiaoniu","language":"zh","build_num":"YVF6R16303000403"}
     */

    private String events;
    private HeaderBean header;

    public LogDataBean() {

    }

    public String getEvents() {
        return events;
    }

    public void setEvents(String events) {
        this.events = events;
    }

    public HeaderBean getHeader() {
        return header;
    }

    public void setHeader(HeaderBean header) {
        this.header = header;
    }

    public static class HeaderBean {
        /**
         * cid_sn : 1501004207EE98AA
         * mobile_data_type :
         * os_ver : 22
         * mac : 1c:77:f6:78:f5:75
         * resolution : 1080x1920
         * commit_time : 1502686418952
         * sdk_ver : 103
         * device_id_type : mac
         * city : 江门市
         * device_model : HUAWEI VNS-AL00
         * android_id : 867830021735040
         * carrier : 中国xx
         * promotion_channel : 1
         * app_ver_name : 1.4
         * imei : 867830021735040
         * app_ver_code : 4010104
         * pid : pid
         * net_type : 3
         * device_id : m.1c:77:f6:78:f5:75
         * app_device_id : m.1c:77:f6:78:f5:75
         * release_channel : 1009
         * country : CN
         * time_zone : 28800000
         * os_name : android
         * manufacture : OPPO
         * commit_id : fde7ee2e48494b24bf3599771d7c2a78
         * account : none
         * app_token : XIAONIU_A
         * app_id : com.appid.xiaoniu
         * language : zh
         * build_num : YVF6R16303000403
         */

        private String cid_sn;
        private String mobile_data_type;
        private String os_ver;
        private String mac;
        private String resolution;
        private String commit_time;
        private String sdk_ver;
        private String device_id_type;
        private String city;
        private String device_model;
        private String android_id;
        private String carrier;
        private String promotion_channel;
        private String app_ver_name;
        private String imei;
        private String app_ver_code;
        private String pid;
        private String net_type;
        private String device_id;
        private String app_device_id;
        private String release_channel;
        private String country;
        private String time_zone;
        private String os_name;
        private String manufacture;
        private String commit_id;
        private String account;
        private String app_token;
        private String app_id;
        private String language;
        private String build_num;
        private String user_id;


        public HeaderBean(){}

        public String getUser_id() {
            return user_id;
        }

        public void setUser_id(String user_id) {
            this.user_id = user_id;
        }

        public String getCid_sn() {
            return cid_sn;
        }

        public void setCid_sn(String cid_sn) {
            this.cid_sn = cid_sn;
        }

        public String getMobile_data_type() {
            return mobile_data_type;
        }

        public void setMobile_data_type(String mobile_data_type) {
            this.mobile_data_type = mobile_data_type;
        }

        public String getOs_ver() {
            return os_ver;
        }

        public void setOs_ver(String os_ver) {
            this.os_ver = os_ver;
        }

        public String getMac() {
            return mac;
        }

        public void setMac(String mac) {
            this.mac = mac;
        }

        public String getResolution() {
            return resolution;
        }

        public void setResolution(String resolution) {
            this.resolution = resolution;
        }

        public String getCommit_time() {
            return commit_time;
        }

        public void setCommit_time(String commit_time) {
            this.commit_time = commit_time;
        }

        public String getSdk_ver() {
            return sdk_ver;
        }

        public void setSdk_ver(String sdk_ver) {
            this.sdk_ver = sdk_ver;
        }

        public String getDevice_id_type() {
            return device_id_type;
        }

        public void setDevice_id_type(String device_id_type) {
            this.device_id_type = device_id_type;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getDevice_model() {
            return device_model;
        }

        public void setDevice_model(String device_model) {
            this.device_model = device_model;
        }

        public String getAndroid_id() {
            return android_id;
        }

        public void setAndroid_id(String android_id) {
            this.android_id = android_id;
        }

        public String getCarrier() {
            return carrier;
        }

        public void setCarrier(String carrier) {
            this.carrier = carrier;
        }

        public String getPromotion_channel() {
            return promotion_channel;
        }

        public void setPromotion_channel(String promotion_channel) {
            this.promotion_channel = promotion_channel;
        }

        public String getApp_ver_name() {
            return app_ver_name;
        }

        public void setApp_ver_name(String app_ver_name) {
            this.app_ver_name = app_ver_name;
        }

        public String getImei() {
            return imei;
        }

        public void setImei(String imei) {
            this.imei = imei;
        }

        public String getApp_ver_code() {
            return app_ver_code;
        }

        public void setApp_ver_code(String app_ver_code) {
            this.app_ver_code = app_ver_code;
        }

        public String getPid() {
            return pid;
        }

        public void setPid(String pid) {
            this.pid = pid;
        }

        public String getNet_type() {
            return net_type;
        }

        public void setNet_type(String net_type) {
            this.net_type = net_type;
        }

        public String getDevice_id() {
            return device_id;
        }

        public void setDevice_id(String device_id) {
            this.device_id = device_id;
        }

        public String getApp_device_id() {
            return app_device_id;
        }

        public void setApp_device_id(String app_device_id) {
            this.app_device_id = app_device_id;
        }

        public String getRelease_channel() {
            return release_channel;
        }

        public void setRelease_channel(String release_channel) {
            this.release_channel = release_channel;
        }

        public String getCountry() {
            return country;
        }

        public void setCountry(String country) {
            this.country = country;
        }

        public String getTime_zone() {
            return time_zone;
        }

        public void setTime_zone(String time_zone) {
            this.time_zone = time_zone;
        }

        public String getOs_name() {
            return os_name;
        }

        public void setOs_name(String os_name) {
            this.os_name = os_name;
        }

        public String getManufacture() {
            return manufacture;
        }

        public void setManufacture(String manufacture) {
            this.manufacture = manufacture;
        }

        public String getCommit_id() {
            return commit_id;
        }

        public void setCommit_id(String commit_id) {
            this.commit_id = commit_id;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }

        public String getApp_token() {
            return app_token;
        }

        public void setApp_token(String app_token) {
            this.app_token = app_token;
        }

        public String getApp_id() {
            return app_id;
        }

        public void setApp_id(String app_id) {
            this.app_id = app_id;
        }

        public String getLanguage() {
            return language;
        }

        public void setLanguage(String language) {
            this.language = language;
        }

        public String getBuild_num() {
            return build_num;
        }

        public void setBuild_num(String build_num) {
            this.build_num = build_num;
        }


        @Override
        public String toString() {
            return
                    user_id + "," +
                            cid_sn + "," +
                            mobile_data_type + "," +
                            os_ver + "," +
                            mac + "," +
                            resolution + "," +
                            commit_time + "," +
                            sdk_ver + "," +
                            device_id_type + "," +
                            city + "," +
                            device_model + "," +
                            android_id + "," +
                            carrier + "," +
                            promotion_channel + "," +
                            app_ver_name + "," +
                            imei + "," +
                            app_ver_code + "," +
                            pid + "," +
                            net_type + "," +
                            device_id + "," +
                            app_device_id + "," +
                            release_channel + "," +
                            country + "," +
                            time_zone + "," +
                            os_name + "," +
                            manufacture + "," +
                            commit_id + "," +
                            account + "," +
                            app_token + "," +
                            app_id + "," +
                            language + "," +
                            build_num;
        }


    }
}
